import VueRouter from 'vue-router'

//导入组件
import HomeContainer from "./components/tabbar/HomeContainer.vue";
import MemberContainer from "./components/tabbar/MemberContainer.vue";
import SearchContainer from "./components/tabbar/SearchContainer.vue";
import ShopCarContainer from "./components/tabbar/ShopCarContainer.vue";
import NewsList from "./components/news/NewsList.vue";
import NewsInfo from "./components/news/NewsInfo.vue";
import PhotoList from "./components/photos/PhotoList.vue";
import PhotoInfo from "./components/photos/PhotoInfo.vue";
import GoodsList from "./components/goods/GoodsList.vue";
import GoodsInfo from "./components/goods/GoodsInfo.vue";
import GoodsComment from "./components/goods/GoodsComment.vue";
import GoodsDetail from "./components/goods/GoodsDetail.vue";

let router = new VueRouter({
    routes: [
        {path:'/', redirect:'/home'},
        {path: '/home', component: HomeContainer},
        {path: '/member', component: MemberContainer},
        {path: '/shopCar', component: ShopCarContainer},
        {path: '/search', component: SearchContainer},
        {path: '/home/newsList', component: NewsList},
        {path: '/home/newsInfo/:id', component: NewsInfo},
        {path: '/home/photoList', component: PhotoList},
        {path: '/home/photoInfo/:id', component: PhotoInfo},
        {path: '/home/goodsList/', component: GoodsList},
        {path: '/home/goodsInfo/:id', component: GoodsInfo},
        {path: '/home/goodsDetail/:id', component: GoodsDetail, name: 'goodsDetail'},
        {path: '/home/goodsComment:id', component: GoodsComment, name: 'goodsComment'}
    ],
    linkActiveClass: 'mui-active'

});

export default router